package znbkListSc.api;

import com.example.lancooznbk.service.HttpGetServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.Api.UserInfo;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by Administrator on 2018\2\9 0009.
 */

public class CollectionListApi extends BaseApi {

    private String ResType = "";
    private int PageNumber = 1;
    private int PageSize = 10;
    private String SearchInfo = "";

    public CollectionListApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    public String getResType() {
        return ResType;
    }

    public void setResType(String resType) {
        ResType = resType;
    }

    public int getPageNumber() {
        return PageNumber;
    }

    public void setPageNumber(int pageNumber) {
        PageNumber = pageNumber;
    }

    public int getPageSize() {
        return PageSize;
    }

    public void setPageSize(int pageSize) {
        PageSize = pageSize;
    }

    public String getSearchInfo() {
        return SearchInfo;
    }

    public void setSearchInfo(String searchInfo) {
        SearchInfo = searchInfo;
    }


    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpGetServer httpGetServer = retrofit.create(HttpGetServer.class);
        return httpGetServer.getCollectionEntity(UserInfo.StuId,UserInfo.SubjectId,UserInfo.StageNo,ResType, PageNumber,PageSize,SearchInfo);
    }
}
